/**
 * @(#)JokeDAO.java, 2013-2-13. Copyright 2013 RENREN, Inc. All rights reserved.
 *                   RENREN PROPRIETARY/CONFIDENTIAL. Use is subject to license
 *                   terms.
 */
package com.wennimei.dao;

import net.paoding.rose.jade.annotation.DAO;
import net.paoding.rose.jade.annotation.SQL;

/**
 * @author shichen.feng@renren-inc.com
 */
@DAO
public interface JokeDAO {

    @SQL("insert into joke (id,content,add_time) values (:1,:2,now())")
    public void insertJoke(int id, String content);

    @SQL("select max(id) from joke")
    public Integer getMaxId();

    @SQL("select content from joke limit :1,1")
    public String getJoke(int from);

    @SQL("select count(1) from joke")
    public Integer sum();
}
